<?php

/**
 * GameItemQuality filter form base class.
 *
 * @package    aiontoolskit
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseGameItemQualityFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'name'      => new sfWidgetFormChoice(array('choices' => array('' => '', 'common' => 'common', 'epic' => 'epic', 'legend' => 'legend', 'mythic' => 'mythic', 'rare' => 'rare', 'unique' => 'unique'))),
      'hexaColor' => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'name'      => new sfValidatorChoice(array('required' => false, 'choices' => array('common' => 'common', 'epic' => 'epic', 'legend' => 'legend', 'mythic' => 'mythic', 'rare' => 'rare', 'unique' => 'unique'))),
      'hexaColor' => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('game_item_quality_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'GameItemQuality';
  }

  public function getFields()
  {
    return array(
      'id'        => 'Number',
      'name'      => 'Enum',
      'hexaColor' => 'Text',
    );
  }
}
